package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.entity.ProductAttrValueEntity;
import com.atguigu.gulimall.product.vo.AttrGroupRelationVo;
import com.atguigu.gulimall.product.vo.AttrRespVo;
import com.atguigu.gulimall.product.vo.AttrVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author zongjp
 * @email 1585999327@qq.com
 * @date 2024-10-05 15:56:31
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils selectAttrByPage(Map<String, Object> params, Long catelogId, String attrType);

    AttrRespVo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attr);

    List<AttrEntity> getRelationAttrList(Long attrgroupId);

    void deleteRelation(List<AttrGroupRelationVo> voList);

    PageUtils getNoRelationAttrByPage(Map<String, Object> params, Long attrgroupId);

    /**
     * 在指定的属性集合中，挑出支持检索的属性
     * @param attrIdList
     * @return
     */
    List<Long> selectSearchAttrIdList(List<Long> attrIdList);
}

